package cn.itrigger.dynamic.sql.condition.impl;

import cn.itrigger.dynamic.sql.condition.AbstractSingleValueCondition;

import java.util.function.Supplier;

/**
 * @author admin
 * @date 2018/10/9
 **/
public class IsLessThan<T> extends AbstractSingleValueCondition<T> {

    protected IsLessThan(Supplier<T> valueSupplier) {
        super(valueSupplier);
    }

    @Override
    public String renderCondition(String columnName, String placeholder) {
        return columnName + " < " + placeholder;
    }

    public static <T> IsLessThan<T> of(Supplier<T> valueSupplier) {
        return new IsLessThan<>(valueSupplier);
    }
}
